package hy.dao;

import hy.beans.Item;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

@Repository
public class StoreDao {
    @Resource(name="tmpB")
    JdbcTemplate tmpB;
    public void reduceNum(Item i) {
        tmpB.update("update book_t set num=num-? where id=?",i.getNum(),i.getBookId());
    }
}